﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once

#include "IExternalObject.h"
#include "GmFamilyService.h"

namespace gcmp
{
    class IDocument;
}

namespace gfam
{
    /// \brief 基准坐标系
    class GM_FAMILY_SERVICE_EXPORT IFamilyDatumAxes : public gcmp::IExternalObject
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyDatumAxes, gcmp::IExternalObject)
    public:
        /// \brief 创建基准坐标系
        ///
        /// \param pDoc 文档指针
        /// \return 返回基准坐标系指针
        /// \note 若已存在则不创建，返回已有的基准坐标系指针
        static IFamilyDatumAxes* Create(gcmp::IDocument *pDoc);

        /// \brief 获取基准坐标系
        ///
        /// \param pDoc 文档指针
        /// \return 返回基准坐标系指针
        static IFamilyDatumAxes* Get(const gcmp::IDocument *pDoc);
        
        /// \brief  获取基准坐标系全局可见性
        ///
        /// \return true表示全局可见；false表示全局不可见
        static bool GetGlobalVisibility();

        /// \brief 获取坐标系轴线长度
        ///
        /// \return 轴线长度，单位：像素
        static UInt32 GetAxisLength();
        
        /// \brief 获取ImplementationUid
        ///
        /// \return ImplementationUid
        static gcmp::UniIdentity GetImplementationUid();
        
        /// \brief 获取基准坐标系的可见性
        ///
        /// \return 可见返回true，不可见返回false
        virtual bool IsVisible() const = 0;

        /// \brief 设置基准坐标系的可见性
        ///
        /// \param bVisible true表示可见，false表示不可见
        virtual void SetIsVisible(bool bIsVisiable) = 0;
    };
}